class Greatwalk < ActiveRecord::Base
  has_many :campsites
  
  validates_presence_of :location
  validates_uniqueness_of :location
  
  def self.find_available_locations
    @locations_list=[]
    @locations=find(:all)
    for greatwalks in @locations
      @locations_list << [greatwalks.location, greatwalks.id]
    end
    @locations_list
  end
  
end
